import request from '@/utils/request'

// 查询病床信息列表
export function listBed(query) {
  return request({
    url: '/his/bed/list',
    method: 'get',
    params: query
  })
}
export function getAvailableBeds() {
  return request({
    url: '/his/bed/availableBeds',
    method: 'get'
  });
}
// 查询病床信息详细
export function getBed(id) {
  return request({
    url: '/his/bed/' + id,
    method: 'get'
  })
}

// 新增病床信息
export function addBed(data) {
  return request({
    url: '/his/bed',
    method: 'post',
    data: data
  })
}
export function batchAddBeds(data) {
  return request({
    url: '/his/bed/batchAdd',
    method: 'post',
    data: data
  })
}
// 修改病床信息
export function updateBed(data) {
  return request({
    url: '/his/bed',
    method: 'put',
    data: data
  })
}

// 删除病床信息
export function delBed(id) {
  return request({
    url: '/his/bed/' + id,
    method: 'delete'
  })
}
